<?php 
	header ("content-type: text/xml; charset=windows-1251");
	$columns = array(
		$this->reports_model->fields['calls_total'],
		$this->reports_model->fields['withsms'],
		$this->reports_model->fields['withemail'],	
	);	
	
	if (empty($list))
	{
		echo '<chart></chart>';		
	}
?>		 
<chart>
	<legend  font="verdana" />
	<chart_data>
		<row>		
			<null/>
			<?php foreach ($list as $row): ?>	
				<string><?php echo T_($row->call_date)?></string>
			<?php endforeach; ?>
		</row>	
		
		<row>
			<string><?php echo $this->reports_model->fields['calls_total'] ?></string>	
			<?php foreach ($list as $row): ?>	
			<number>1<?php echo T_($row->calls_total)?></number>
			<?php endforeach; ?>
		</row>
		
		<row>
			<string><?php echo $this->reports_model->fields['withsms'] ?></string>		
			<?php foreach ($list as $row): ?>	
			<number>2<?php echo T_($row->withsms)?></number>
			<?php endforeach; ?>
		</row>

		<row>
			<string><?php echo $this->reports_model->fields['withemail'] ?></string>
			<?php foreach ($list as $row): ?>	
			<number>3<?php echo T_($row->withemail)?></number>
			<?php endforeach; ?>
		</row>

   </chart_data>   
</chart>